#ifndef GUI_H
#define GUI_H

#include "gui/graphicview.h"
#include "gui/guieventdispatcher.h"
#include "app/root.h"
#include "actions/actioninvoker.h"


namespace gui
{
    /**
    *   GUI
    */
    class Gui
    {
        actions::ActionInvoker* invoker; //APP CONTROLLER
		app::Root* root;                 //DOCUMENT
		GraphicView* graphicview;        //VIEW

		GuiEventDispatcher guieventdispatcher;

        public:
            Gui(app::Root* const root, actions::ActionInvoker* const invoker);
            virtual ~Gui();

            void init() ;
            void done() ;

            GraphicView* getGraphicView() {return graphicview;}
            actions::ActionInvoker* getActionInvoker() {return invoker;}
			app::Root* getDocumentRoot() {return root;}

		protected:

        private:
			void setDocumentRoot(app::Root* root);

            void buildView();
            void destroyView();
    };

}
#endif // GUI_H
